package cn.crm.service.impl;

import cn.crm.dao.SalChanceDao;
import cn.crm.dao.SalPlanDao;
import cn.crm.pojo.SalChance;
import cn.crm.pojo.SalPlan;
import cn.crm.service.SalChanceService;
import cn.crm.service.SalPlanService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)//事务回滚
@Service
public class SalPlanServiceImpl extends ServiceImpl<SalPlanDao, SalPlan> implements SalPlanService {
    @Autowired
    private SalPlanDao salPlanDao;
    @Override
    public Page<SalPlan> getSalPlanPageJoinSalChance(Page page) {
        return salPlanDao.getSalPlanPageJoinSalChance(page);
    }

    @Override
    public List<SalPlan> getSalPlanListByChcId(Integer chcId) {
        return salPlanDao.getSalPlanListByChcId(chcId);
    }
}
